const checkItems = data => {
  let arr = []
  const fn = data => {
    for (let item of data) {
      if (item.check) {
        arr.push(item)
      }
      if (item.children.length > 0) {
        fn(item.children)
      }
    }
  }
  fn(data)
  return arr
}
export default checkItems
